#!/usr/bin/env bash

echo "start install docker" 

# docker
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum makecache fast
yum -y install docker-ce
systemctl start docker

echo "docker 安装成功"
echo "开始测试docker是否安装看成。看下面输出"
docker -v


echo "start install docker-compose" 
# docker-compose
curl -L https://github.com/docker/compose/releases/download/1.18.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

echo "docker-compose 安装成功"
echo "开始测试docker-compose是否安装看成。看下面输出"
docker-compose -v